Surface Reopen Closed Session in the new-session menu on Linux and Windows#9347
Surface Reopen Closed Session in the new-session menu on Linux and Windows#9347mvanhorn wants to merge 1 commit intowarpdotdev:masterfrom
Conversation
…ndows
The Ctrl+Alt+T / Cmd+Shift+T action to reopen the most recently closed
session was only discoverable through the macOS application menu bar
('app/src/app_menus.rs:1042'). On Linux and Windows, where there is no
menu bar entry, users had no UI affordance for the action.
Add a 'Reopen closed session' entry as the last item in the new-session
'+' dropdown ('unified_new_session_menu_items'). The behavior mirrors the
macOS menu entry: the item is greyed out when the UndoCloseStack is
empty, and the keybinding hint is sourced from the
'app:reopen_closed_session' editable binding. The entry is added on
every platform so macOS users get parity with the menu-bar entry from
the dropdown surface as well.
Add 'test_unified_new_session_menu_includes_reopen_closed_session' to
verify presence as the last item, the dispatched action, the empty-stack
disabled state, and the enabled state after a tab is closed.
|
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the users @mvanhorn on file. In order for us to review and merge your code, each contributor must visit https://cla.warp.dev to read and agree to our CLA. Once you have done so, please comment |
|
I'm starting a first review of this pull request. You can follow along in the session on Warp. I approved this pull request and requested human review from: @vorporeal, @alokedesai, @zachbai. Comment I approved this pull request. No matching stakeholder was found for the changed files, so no human reviewers were requested. Comment Powered by Oz |
There was a problem hiding this comment.
Overview
This PR adds the existing Reopen closed session action to the unified new-session menu, includes the current keybinding hint, disables the item when the undo-close stack is empty, and adds coverage for the new menu ordering and enabled state.
Concerns
- No blocking concerns found.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
There was a problem hiding this comment.
Overview
This PR adds a "Reopen closed session" item to the unified new-session menu, using the existing editable binding label, WorkspaceAction::ReopenClosedSession, and UndoCloseStack disabled state. The accompanying test covers the item placement, action, and disabled/enabled states.
Concerns
- No blocking correctness or security concerns found in the changed lines.
Verdict
Found: 0 critical, 0 important, 0 suggestions
Approve
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
Description
Issue #9120 reports that on Linux and Windows, the "Restore closed tab" action works via the keyboard shortcut (
Ctrl+Alt+T) but has no UI affordance, so users can't discover it. macOS already exposes "Reopen closed session" through the application menu bar (app/src/app_menus.rs:1042-1056), but Linux and Windows have no such menu.This adds a "Reopen closed session" entry as the last item in the new-session
+dropdown (unified_new_session_menu_items) on every platform. Behavior matches the existing macOS menu entry: the item is greyed out whenUndoCloseStackis empty, and the keybinding hint is sourced from theapp:reopen_closed_sessioneditable binding registered inapp/src/undo_close/mod.rs. Adding it on macOS too gives parity for users who use the dropdown rather than the menu bar.Testing
Added
test_unified_new_session_menu_includes_reopen_closed_sessioninapp/src/workspace/view_test.rs. The test:MenuItem::Separator.WorkspaceAction::ReopenClosedSession.UndoCloseStackis empty.Verified locally with
cargo nextest run -p warp test_unified_new_session_menu_includes_reopen_closed_session,cargo fmt -- --check, andcargo clippy -p warp --all-targets --tests -- -D warnings.Server API dependencies
N/A. Pure UI change wired to an existing action.
Agent Mode
Changelog Entries for Stable
CHANGELOG-BUG-FIX: Reopen Closed Session is now reachable from the new-session menu on Linux and Windows.
Fixes #9120